//
// Created by Administrator on 2023/8/6.
//
#include <vector>
#include <iostream>

using namespace std;

class Solution {
public:
    vector<int> evenOddBit(int n) {
        int counter = 0, oneInOdd = 0, oneInEven = 0;
        while (n > 0) {
            if (n & 1) {
                if (counter % 2 == 0) {
                    oneInEven++;
                } else {
                    oneInOdd++;
                };
            }
            n >>= 1;
            counter++;
        }
        return vector<int>{oneInEven, oneInOdd};
    }
};

int main() {
    Solution solution;
    auto ans = solution.evenOddBit(17);
    for (auto &x: ans) cout << x << " ";
    return 0;
}